﻿@{
    Layout = null;
}

<!DOCTYPE html>

<head>
    <meta name="viewport" content="width=device-width" />
    <title>仪器设备-台账</title>
    <link rel="stylesheet" type="text/css" href='@Url.Content("~/Scripts/jquery-easyui/themes/default/easyui.css")'>
    <link rel="stylesheet" type="text/css" href='@Url.Content("~/Scripts/jquery-easyui/themes/icon.css")'>
    <link rel="stylesheet" type="text/css" href='@Url.Content("~/Scripts/jquery-easyui/demo.css")'>
    <link rel="stylesheet" type="text/css" href='@Url.Content("~/Scripts/uploader/uploadify.css")' />
    <script type="text/javascript" src='@Url.Content("~/Scripts/jquery-1.8.2.min.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/jquery-easyui/jquery.easyui.min.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/jquery-easyui/locale/easyui-lang-zh_CN.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/uploader/jquery.uploadify.min.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/uploader/swfobject.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/MicrosoftAjax.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/MicrosoftMvcAjax.js")'></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#dgtable').datagrid({
                url: "/Device/GetDeviceLogList",
                pagination: true,//分页控件  
                singleSelect: true,//是否单选
                rownumbers: true,
                queryParams: { 'pageNumber': 1, '_cid': 0, '_type': "", '_text': "" },
                columns: [[
                    { field: 'name', title: '设备（仪器）名称', width: 100 },
                    { field: 'type', title: '规格型号', width: 100 },
                    { field: 'pCode', title: '资产编号', width: 80 },
                    { field: 'eCode', title: '设备编号', width: 50 },
                    { field: 'buyDate', title: '购置日期', width: 120 },
                    { field: 'useDate', title: '启用日期', width: 120 },
                    { field: 'price', title: '原值（元）', width: 50 },
                    { field: 'depercitionNum', title: '折旧年限', width: 120 },
                    { field: 'verificationNum', title: '检定周期', width: 80 },
                    { field: 'lastVerificationDate', title: '上次检定日期', width: 80 },
                    { field: 'verificationResult', title: '检定结论', width: 80 },
                    { field: 'nextVerificationDate', title: '下次检定日期', width: 80 },
                    { field: 'technologyStatus', title: '技术状况', width: 80 },
                    { field: 'problem', title: '存在问题及部位', width: 80 },
                    { field: 'companyId', title: '使用单位', width: 80 },
                    { field: 'userId', title: '使用人', width: 80 },
                    { field: 'amount', title: '领用数量', width: 80 },
                    { field: 'kucun', title: '库存结余', width: 80 }
                ]]
            });
            var p = $('#dgtable').datagrid('getPager');
            $(p).pagination({
                pageSize: 10,//每页显示的记录条数，默认为10  
                pageList: [8],//可以设置每页记录条数的列表  
                onSelectPage: function (pageNumber, pageSize) {
                    var tablequeryParams = $('#dgtable').datagrid('options').queryParams;
                    tablequeryParams.pageNumber = pageNumber;
                    $('#dgtable').datagrid('options').queryParams = tablequeryParams;
                    $("#dgtable").datagrid("reload");
                }
            });
        });

        function click_Search() {
            var _cid = $('#ddlcompany').val();
            var _type = $('#ddlsearch').val();
            var _text = $('#txt_Search').val();
            var tablequeryParams = $('#dgtable').datagrid('options').queryParams;
            if (_cid > 0) {
                tablequeryParams._cid = _cid;
            }
            tablequeryParams._type = _type; tablequeryParams._text = _text;
            $('#dgtable').datagrid('options').queryParams = tablequeryParams;
            $("#dgtable").datagrid("reload");
        }
    </script>
    <style type="text/css">
        .divList {
            position: absolute;
            top: 40px;
            left: 1px;
            z-index: 99;
            width: 1048px;
        }

        a {
            text-decoration: none;
            color: #000;
        }

            a img {
                border: 0;
            }

        .biaoge {
            width: 1040px;
            font-family: '宋体';
            font-size: 12px;
            color: #10607c;
        }

            .biaoge td {
                text-align: center;
                height: 26px;
                vertical-align: middle;
                border: 1px solid #d4d3d3;
            }
    </style>
</head>
<body style="background-color: transparent; overflow: auto;">
    <div style="background: #faf1e8; height: 30px; width: 100%; top: 1px; position: absolute; z-index: 99; left: 1px;">
        <table align="left" width="100%" height="27px">
            <tr>
                <td width="1029" style="font-family: '宋体'; font-size: 12px; color: #10607c;">当前位置：设备管理<img style="text-align:center;vertical-align:middle;height:10px" src='@Url.Content("~/Content/Images/位置.png")' />设备管理 </td>
            </tr>
        </table>
    </div>

    <div class="divList">
        <table cellpadding="0" cellspacing="0" width="1040px">
            <tr>
                <td>
                    <table cellpadding="0" cellspacing="0" width="1040px">
                        <tr>
                            <td width="200px" style="font-family: '宋体'; font-size: 12px; color: #10607c;">单位：
                                @if ((Session["UserInfo"] as Model.PersonnelManage.E_tb_InPersonnel).DataRange == 1)
                                {
                                    @Html.DropDownList("ddl_company", ViewData["ddl_company"] as SelectList, new { @id = "ddlcompany" })
                                }
                                else
                                { 
                                   @Html.DropDownList("ddl_company", ViewData["ddl_company"] as SelectList, new { @id = "ddlcompany",@disabled = "disabled" })
                                }
                            </td>
                            <td width="150px" style="font-family: '宋体'; font-size: 12px; color: #10607c;">按：      
                                    <select id="ddlsearch">
                                        <option value="设备名称">设备名称</option>
                                        <option value="资产编号">资产编号</option>
                                        <option value="设备编号">设备编号</option>
                                        <option value="购置日期">购置日期</option>
                                        <option value="启用日期">启用日期</option>
                                        <option value="上次检定日期">上次检定日期</option>
                                    </select>
                            </td>
                            <td width="160px">
                                <input style="border: 1px solid #3496d6;" width="150px" type="text" id="txt_Search" /></td>
                            <td width="160px">
                                <a href="javascript:void(0)" onclick="click_Search()">
                                    <img src='@Url.Content("~/Content/Images/chaxun.png")' height="20px" /></a>
                            </td>
                            <td align="right">&nbsp;
                                @*<a href="javascript:void(0)" onclick="click_Edit(0)">
                                    <img src='@Url.Content("~/Content/Images/xinzeng.png")' height="20px" /></a>
                                <a href="javascript:history.go(-1)" target="mainframe">
                                    <img src="../../Content/Images/fanhui.png" height="20px" /></a>*@
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <table cellpadding="0" cellspacing="0" class="biaoge" id="dgtable" height="400px">
                    </table>
                </td>
            </tr>
        </table>
    </div>
</body>
